package com.dengyuanke.upms.domain.feign;

import com.dengyuanke.common.core.constant.SecurityConstants;
import com.dengyuanke.common.core.constant.ServiceNameConstants;
import com.dengyuanke.common.core.result.R;
import com.dengyuanke.upms.domain.entity.Log;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: dyk
 * Create time: 2019-07-13  13:53
 */
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.UMPS_SERVICE,fallback = RemoteLogServiceFallback.class)
public interface RemoteLogService {

    /**
     * 保存日志
     *
     * @param log
     * @return
     */
    @PostMapping("/log")
    R<Boolean> saveLog(@RequestBody Log log, @RequestHeader(SecurityConstants.FROM) String FROM);
}
